package com.peaksport.framework.extend.kafka;

import java.util.Map;

import org.apache.kafka.common.serialization.Deserializer;

import com.peaksport.framework.util.PKJSONUtils;
import com.peaksport.framework.vo.JSONKafkaMsg;

public class PKJSONKafkaMsgDeserializer implements Deserializer<JSONKafkaMsg> {

	@Override
	public void configure(Map<String, ?> configs, boolean isKey) {}

	@Override
	public JSONKafkaMsg deserialize(String topic, byte[] data) {
		return (JSONKafkaMsg)PKJSONUtils.toBean(data, JSONKafkaMsg.class);
	}

	@Override
	public void close() {}

}
